<?php
/**
 * @file headernavrightdatacontroller.php
 * @author LinLin
 * @date 2016年11月8日 上午11:56:01
 * @brief 
 */
namespace haibao\cms\business\control\pc\common;

class HeaderNavRightDataController extends \haibao\cms\business\control\Base{

    public function __construct($updateTime = null,$controlId,$isPublish){
        parent::__construct($updateTime,$controlId,$isPublish);
    }


    /**
     * 获取模版内容
     * @param : String $content
     */
    public function displayTemplateHtml(){
        $controlData = $this->getParameter(self::$CONTROL_DATA);
        $content = $this->getParameter(self::$CONTROL_CONTENT);
        $path = $this->generateHtmlPath(__CLASS__);
        $parameters = array();
        if($controlData['auto']){
            $temp = array();
            foreach($controlData['auto'] as $data){
                $parameterValue = json_decode($data['ParameterValue']);
                array_push($parameters,$parameterValue);
            }
        }
        $this->assign('parameters', $parameters);
        $this->generateHtml($path,$content);
        return $this->getHtml($path);
    }
}